package com.atjava.webspider.model;

import java.util.List;

import com.atjava.jox.annotation.ClassProps;
import com.atjava.jox.annotation.FieldProps;
import com.atjava.jox.annotation.FieldProps.ElementType;

@ClassProps(alias="app-config")
public class AppConfig {

	private int maxRetryCount;
	
	@FieldProps
	private int workThreads;
	
	@FieldProps
	private int workStopTimeout;
	
	@FieldProps(type = ElementType.ELEMENT)
	private Proxy proxy;
	
	/** 读取HTTP流缓存大小 */
	@FieldProps
	private int bufferSize;
	
	@FieldProps(type=ElementType.ELEMENT,alias="default-resources")
	private List<DefaultResource> resources;
	
	public List<DefaultResource> getResources() {
		return resources;
	}

	public void setResources(List<DefaultResource> resources) {
		this.resources = resources;
	}

	public int getBufferSize() {
		return bufferSize;
	}

	public void setBufferSize(int bufferSize) {
		this.bufferSize = bufferSize;
	}

	public int getWorkThreads() {
		return workThreads;
	}

	public void setWorkThreads(int workThreads) {
		this.workThreads = workThreads;
	}

	public int getWorkStopTimeout() {
		return workStopTimeout;
	}

	public void setWorkStopTimeout(int workStopTimeout) {
		this.workStopTimeout = workStopTimeout;
	}

	public Proxy getProxy() {
		return proxy;
	}

	public void setProxy(Proxy proxy) {
		this.proxy = proxy;
	}
	
}
